package belf.migrate.api.job;

/**
 * 定义Job执行的各自状态
 */
public class JobCode {

    public final static int EXECUTING = 0;
    /** 提交任务成功。对于CDC数据同步，是异步执行的，提交完成立即返回 */
    public final static int SUBMIT_OK = 1;
    /** 任务执行成功 */
    public final static int SUCCESS = 2;
    /** 执行任务遇到错误 */
    public final static int FAILTURE = 3;

    /** 任务执行发生未知错误 */
    public final static int UNKNOW_ERROR = 9999;

    public final static int NO_SOURCE_CATALOG = 1001;

    public final static int NO_SINK_CATALOG = 1002;

    public final static int NO_JDBC_SINK = 1003;

    public final static int CREATE_TABLE_ERROR = 1004;

    public final static int DROP_TABLE_ERROR = 1005;

    public final static int CREATE_INDEX_ERROR = 1006;

    public final static int DROP_INDEX_ERROR = 1007;

    public final static int CREATE_FOREIGNKEY_ERROR = 1008;

    public final static int CREATE_VIEW_ERROR = 1009;

    public final static int DROP_VIEW_ERROR = 1010;

    public final static int CREATE_TYPE_ERROR = 1011;

    public final static int DROP_TYPE_ERROR = 1012;

    public final static int CREATE_TRIGGER_ERROR = 1013;

    public final static int DROP_TRIGGER_ERROR = 1014;

    public final static int CREATE_PROCEDURE_ERROR = 1015;

    public final static int DROP_PROCEDURE_ERROR = 1016;

    public final static int CREATE_SEQ_ERROR = 1017;

    public final static int CREATE_SYNONYM_ERROR = 1018;

    public final static int DROP_SEQ_ERROR = 1019;

    public final static int CREATE_FUNCTION_ERROR = 1020;

    public final static int DROP_FUNCTION_ERROR = 1021;

    public final static int DROP_SYNONYM_ERROR = 1022;


    /** 获取目标端的表元数据失败 */
    public final static int GOT_SOURCE_METADATA_ERROR = 2001;
    public final static int GOT_SINK_METADATA_ERROR = 2002;

    // 以下是各种DDL转化的错误代码
    public final static int CONVERT_TABLE_ERROR = 2101;
    public final static int CONVERT_VIEW_ERROR = 2102;
    public final static int CONVERT_TYPE_ERROR = 2103;
    public final static int CONVERT_CLASS_ERROR = 2104;
    public final static int CONVERT_TRIGGER_ERROR = 2105;
    public final static int CONVERT_PROCEDURE_ERROR = 2106;


}
